package com.qfedu.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

//工作总结
public class Week {

    private int id;
    //标题
    private String title;
    //内容
    private String content;
    //现状
    private int status;
    //创建时间
    // 将接收的数据 yyyy-MM-dd hh:mm:ss 转换为 Date  // 转换json 时将 date 转换为 字符串
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 将 util.Date 转化为 字符进行保存
    private Date createTime;
    private String uNo;

    public Week(int id, String title, String content, int status, Date createTime, String uNo) {
        this.id = id;
        this.title = title;
        this.content = content;
        this.status = status;
        this.createTime = createTime;
        this.uNo = uNo;
    }

    public Week() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getuNo() {
        return uNo;
    }

    public void setuNo(String uNo) {
        this.uNo = uNo;
    }

    @Override
    public String toString() {
        return "Week{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", status=" + status +
                ", createTime=" + createTime +
                ", uNo='" + uNo + '\'' +
                '}';
    }
}
